package com.cw.controller;


import com.cw.common.api.*;
import com.cw.request.*;
import com.cw.service.*;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;

/**
 * @author smq
 * @since 2021-04-27
 */
@Api(tags = {"床位"})
@RestController
@RequestMapping("/bed")

public class BedController {

    @Autowired
    private IBedService targetService;


    @ApiOperation(value = "获取空闲床位")
    @PostMapping("/getEemptyBedsList")
    public ResultObject getEemptyBedsList(@RequestBody EmptyBedsRequest emptyBedsRequest) {


        return ResultObject.successReturn(targetService.getEemptyBedsList(emptyBedsRequest));
    }

//    @ApiOperation(value = "获取空闲床位详情(院区code,病区code,院区名称+病区名称)")
//    @PostMapping("/getEemptyBedsDetails")
//    public ResultObject getEemptyBedsDetails(@RequestParam String districtCode, String areaCode, @RequestParam String name) {
//        return ResultObject.successReturn(targetService.getEemptyBedsDetails(districtCode, areaCode));
//    }

    @ApiOperation(value = "获取床位详情")
    @PostMapping("/getEemptyBedsDetails")
    public ResultObject getEemptyBedsDetails(@RequestBody EmptyBedsRequest emptyBedsRequest) {
        return ResultObject.successReturn(targetService.getEemptyBedsDetails(emptyBedsRequest));
    }

}

